| 1 | import { readMessage } from "../../env.ts"; |
| 2 | |
| 3 | /** |
| 4 | * Dynamic route with a path param: waku's fs-router passes the `[id]` segment |
| 5 | * as the `id` prop. Rendered by the worker at request time. |
| 6 | */ |
| 7 | export default async function ItemPage({ id }: { id: string }) { |
| 8 | return ( |
| 9 | <div> |
| 10 | <div data-testid="item-marker">ITEM_MARKER id={id}</div> |
| 11 | <div data-testid="item-env">MESSAGE={await readMessage()}</div> |
| 12 | </div> |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | export const getConfig = async () => ({ render: "dynamic" }) as const; |